﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Epona.Domain.Query
{
    public interface ICriterionBuilder
    {
        IQueryCriterion Eq(string propName, object value);
        IQueryCriterion NotEq(string propName, object value);
        IQueryCriterion Ge(string propName,IComparable value);
        IQueryCriterion Gt(string propName, IComparable value);
        IQueryCriterion Le(string propName, IComparable value);
        IQueryCriterion Lt(string propName, IComparable value);
        IQueryCriterion EqProp(string propName, string otherPropName);
        IQueryCriterion NotEqProp(string propName, string otherPropName);
        IQueryCriterion GtProp(string propName, string otherPropName);
        IQueryCriterion GeProp(string propName, string otherPropName);
        IQueryCriterion LtProp(string propName, string otherPropName);
        IQueryCriterion LeProp(string propName, string otherPropName);
        IQueryCriterion SizeEq(string propName, int size);
        IQueryCriterion SizeNotEq(string propName, int size);
        IQueryCriterion SizeGe(string propName, int size);
        IQueryCriterion SizeGt(string propName, int size);
        IQueryCriterion SizeLe(string propName, int size);
        IQueryCriterion SizeLt(string propName, int size);
        IQueryCriterion ContainsText(string propName, string value);
        IQueryCriterion StartsWithText(string propName, string value);
        IQueryCriterion In(string propName, ICollection value);
        IQueryCriterion In(string propName, Object[] value);
        IQueryCriterion NotIn(string propName, ICollection value);
        IQueryCriterion NotIn(string propName, Object[] value);
        IQueryCriterion Between(string propName, IComparable from, IComparable to);
        IQueryCriterion IsNull(string propName);
        IQueryCriterion NotNull(string propName);
        IQueryCriterion IsEmpty(string propName);
        IQueryCriterion NotEmpty(string propName);
        IQueryCriterion Not(IQueryCriterion criterion);
        IQueryCriterion And(params IQueryCriterion[] criterions);
        IQueryCriterion Or(params IQueryCriterion[] criterions);
        IQueryCriterion IsTrue(string propName);
        IQueryCriterion IsFalse(string propName);
        IQueryCriterion IsBlank(string propName);
        IQueryCriterion NotBlank(string propName);
        IQueryCriterion Empty();
    }
}
